home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
UTIL
/
DESKTOP
/
APPDOCK2
/
!AppDock2
/
!RunImage
(
.txt
)
< prev
next >
Wrap
RISC OS BBC BASIC V Source
|
1996-09-28
|
43KB
|
1,826 lines
> !AppDock.!RunImage
This application is FREEWARE, i.e. you may copy and distribute
it as long as all files are supplied and nothing is modified.
1992-96 Martin W
rthner
Jahnstrasse 18
71116 Gaertringen
Germany
Gidtlen%=1000:idblen%=256:windowlen%=2000:dtlen%=24*30:sctlen%=16*30
IDT% idtlen%:
IDB% idblen%
BUFFER% 300,dockt% dtlen%,sct% sctlen%:
scv% 20
;menulen%=1000:
MENU% menulen%,Q% 48,WINDOW% windowlen%
TASK=&4B534154
mbl% 64
H!mbl%=&502:mbl%!4=&400c1:mbl%!8=1:mbl%!12=3:mbl%!16=&400c7:mbl%!20=0
(-256)<&A4
version%=2
version%=3.1
"Wimp_Initialise",version%*100,TASK,"Application Dock",mbl%
OS_V,task_h%
errorbox:
finish:
"OS_ReadMonotonicTime"
oldtime%
"OS_GetEnv"
DOCKFILE$=""
EV$,"-quit")
EV$,"""")
EV$,"""",PP+1)
PP+=1
EV$,PP,1)<>" "
DOCKFILE$=
EV$,PP)
DOCKFILE$=""
DOCKFILE$="<Dock$Dir>.!Dock"
("<Dock$Dir>.Sprites")
S=0
1,"Can't read sprite file"
EXS%=
Sprites% EXS%+40:
0?!Sprites%=EXS%+40:Sprites%!4=0:Sprites%!8=16:Sprites%!12=16
"OS_SpriteOp",522,Sprites%,"<Dock$Dir>.Sprites"
MAX=100:SS%=136:SB%=132
P$(MAX),KN(MAX),CT(MAX),KEYC%(MAX),KFLAG(MAX),CODES%(20)
4 MAXAPPS=20:DSCMAX=32:SCL%=15
ANZPS%=255
SCL%
SAN%=-
(-DSCMAX/ANZPS%)
SD$(MAXAPPS,SAN%)
APP$(MAXAPPS),SCKEYC%(MAXAPPS,DSCMAX),SCON(MAXAPPS)
N=0
MAXAPPS-1
M=0
SAN%-1
;, SD$(N,M)=
SCL%,
SCL%-1," "))
>"APPNUM=0:SCKEYC%()=-1:SCON()=0
?5DON=0:DOF=0:SCOF=0:NOSC=7:dock_h%=-1:defcut_h%=-1
@)REOPEN=
:DPOS=1:SCPOS=0:SC=
:EDFLAG=
SHORTTOP=
:DOCK_POS=-2
"AppDockSpt_GetPollWord"
,,poll_word%
"AppDockSpt_ClearKeyStatus"
NM$="(none)":AF=
codes
read_dock:
boot_dock
read_sc
errorbox:
finish:
buffers:
indirected_text:
infowindow
upwindow(DOCK_POS):
downwindow(DOCK_POS)
scleftwindow(DOCK_POS):
scrightwindow(DOCK_POS)
shortwindow:
defappwindow(DOCK_POS)
editwindow:
edscwindow
readvduinfo
initialise_menu_tree:MENU2%=MAINPOINTER%(2)
d_tick:
sc_tick:
st_tick
Version$="2.43":Date$="28-Sep-96" see below
Fileversion$="0"
U*MASK0%=1+(1<<4)+(1<<5)+(1<<11)+(1<<12)
MASK1%=MASK0%
MASK%=MASK0%
MASK%=MASK1%
OLH%=-3
open_all(DOCK_POS):
clear_sc
(SHORTTOP
version%<3)
MASK%=MASK1%
REOPEN
MASK%=MASK0%
(SHORTTOP
version%>=3)
MASK%=MASK%+(1<<22)
"OS_ReadMonotonicTime"
newtime%
(newtime%-oldtime%)>0
oldtime%=oldtime%+50
"Wimp_PollIdle",MASK%,BUFFER%,oldtime%,poll_word%
REASON%
REASON%
REOPEN
open_all(DOCK_POS)
REOPEN=
MASK%=MASK0%
r
EDFLAG
u+
"Wimp_GetCaretPosition",,BUFFER%
v- CA%=!BUFFER%:BUFFER%!12=0:!BUFFER%=20
CA%=-1
OLH%<>-1
y- NM$="(no input focus)":OLH%=-1:AF=
z; $defappi0=NM$:
redraw_icon(defapp_h%,0):
clear_sc
|
}5
"Wimp_SendMessage",19,BUFFER%,CA%
,,R2%
R2%<>OLH%
C BUFFER%!20=R2%:BUFFER%!12=0:BUFFER%!16=&400C6:!BUFFER%=24
5
"Wimp_SendMessage",17,BUFFER%,0:OLH%=R2%
SHORTTOP
version%<3
)
"AppDockSpt_GetKeyStatus"
R%<>0
process_key_status
sysopen
"Wimp_CloseWindow",,BUFFER%
check_mouse
user_drag_box
key_pressed
get_pointer:
menu_select
process_key_status
17,18:
receive
process_key_status
"AppDockSpt_ClearKeyStatus"
DOCK_POS=-1
DOCK_POS=-2
DOCK_POS=-1
recreate_and_open_all
recreate_and_open_all
delete_(scleft_h%):
delete_(scright_h%)
delete_(up_h%):
delete_(down_h%)
delete_(defapp_h%):
delete_(dock_h%):
delete_(defcut_h%)
scleftwindow(DOCK_POS):
scrightwindow(DOCK_POS)
upwindow(DOCK_POS):
downwindow(DOCK_POS)
defappwindow(DOCK_POS)
open_all(DOCK_POS)
delete_(
h%<>-1
1 !BUFFER%=h%:
"Wimp_DeleteWindow",,BUFFER%
h%=-1
sysopen
REOPEN
!BUFFER%<>up_h%
!BUFFER%<>down_h%
!BUFFER%<>dock_h%
!BUFFER%<>scleft_h%
!BUFFER%<>scright_h%
!BUFFER%<>defcut_h%
!BUFFER%<>defapp_h%
"Wimp_OpenWindow",,BUFFER%
"Wimp_OpenWindow",,BUFFER%
start(FELD%,OPFL%)
FF$=P$(FELD%)
FELD%>=DON
FF$=""
"OS_Byte",121,0
128
(FL=0
OPFL%=
leaf(FF$),1)="!"
"XWimp_StartTask","Run "+FF$+".!Run"+
("Filer_OpenDir "+FF$)
read_dock
erreport("Invalid dock file ("+
$+", error code "+
):DON=0:DOF=0:APPNUM=0:
(DOCKFILE$)
S=0
DON=0:DOF=0:
new format
! B2=
#S:B3=
#S:B4=
#S:B5=
V$=
DON=
get_num(S)
DON>0
N=0
DON-1
P$(N)=
get_line(S)
@ KFLAG(N)=
get_num(S):KN(N)=
get_num(S):CT(N)=
get_num(S)
7
KFLAG(N)
KEYC%(N)=CODES%(KN(N)-4)+&10*CT(N)
old format
#S,DON
N=0
DON-1
#S,P$(N),KFLAG(N),KN(N),CT(N)
KFLAG(N)
KEYC%(N)=CODES%(KN(N)-4)+&10*CT(N)
boot_dock
DON>0
N=0
DON-1
SP$=
leaf(P$(N))
SP$,1)="!"
sprite present?
/
"XWimp_SpriteOp",256+40,,SP$
;FLG%
FLG%
sprite not present
version%<3
.
"XOS_File",17,P$(N)+".!Boot"
TY=0
>
boot not present, therefore load sprites manually
@
"XOS_CLI","IconSprites "+P$(N)+".!Sprites"
;FLG%
>
"XWimp_StartTask","Run "+P$(N)+".!Boot"
;FLG%
:
"XWimp_StartTask","Filer_Boot "+P$(N)
;FLG%
FLG%
r
errc(P$(N)+" not found, OK to continue, Cancel to cancel all following dock entries")=2
DON=N:
P$(N)="":KFLAG(N)=
read_sc
erreport("Invalid !ShortCuts file ("+
$+", error code "+
):APPNUM=0:
("<Dock$Dir>.!ShortCuts")
S=0
APPNUM=0:
B1<>
1,"Invalid !ShortCuts file"
B2=
#S:B3=
#S:B4=
#S:B5=
' B1=
#S:B2=
#S:B3=
#S:B4=
#S:B5=
DPOS=B1-48:SCPOS=B2-48
SHORTTOP=(B3=48):SC=(B4=49)
APPNUM=
get_num(S)
APPNUM>0
N=0
APPNUM-1
APP$(N)=
get_line(S)
SCON(N)=
get_num(S)
M>0
M=0
SCON(N)-1
A$=
get_line(S)
! SCKEYC%(N,M)=
get_num(S)
set_sc_o(N,M,A$)
check_mouse
+ X%=!BUFFER%:Y%=BUFFER%!4:BT%=BUFFER%!8
( HANDLE%=BUFFER%!12:ICON%=BUFFER%!16
HANDLE%=dock_h%
FELD%=ICON%
2+DOF
HANDLE%=defcut_h%
FELD%=ICON%+SCOF
BT%
HANDLE%=dock_h%
FELD%>=DON
$appname="(none)"
$
reset("(non",MENU%,0,0)
set("(non",MENU%,8,22)
set("Inse",MENU%,8,22)
set("Dele",MENU%,8,22)
$appname="(none)"
*!
reset("(non",MENU%,8,22)
+!
reset("Inse",MENU%,8,22)
,!
reset("Dele",MENU%,8,22)
KFLAG(FELD%)
set("(non",MENU%,0,0)
clear_all
!BUFFER%=short_h%
1A BUFFER%!4=KN(FELD%):BUFFER%!8=(1<<21):BUFFER%!12=(1<<21)
2(
"Wimp_SetIconState",,BUFFER%
BUFFER%!4=CT(FELD%)
4(
"Wimp_SetIconState",,BUFFER%
5
6!
reset("(non",MENU%,0,0)
clear_all
8? !BUFFER%=short_h%:BUFFER%!8=(1<<21):BUFFER%!12=(1<<21)
9 BUFFER%!4=0 :
'Alone'
:(
"Wimp_SetIconState",,BUFFER%
;
<) $appname="'"+
leaf(P$(FELD%))+"'"
=. $shorttb=
leaf(P$(FELD%))+": Shortcut"
?.
"Wimp_CreateMenu",,MENU%,X%-16,Y%-16
CMENU%=MENU%
MENICON%=FELD%
HANDLE%=defcut_h%
EDFLAG
(APPNUM>0)
set_edsc_fields
F"
reset("Shor",MENU2%,8,22)
FELD%<SCON(AFN)
H#
reset("Dele",MENU2%,8,22)
I#
reset("Inse",MENU2%,8,22)
J
K!
set("Dele",MENU2%,8,22)
L!
set("Inse",MENU2%,8,22)
M
O
set("Shor",MENU2%,8,22)
P
set("Inse",MENU2%,8,22)
Q
set("Dele",MENU2%,8,22)
S/
"Wimp_CreateMenu",,MENU2%,X%-16,Y%-16
CMENU%=MENU2%
MENICON%=FELD%
HANDLE%=up_h%
DOF=0
open_dock(DOCK_POS)
HANDLE%=down_h%
\,
DOF=0
DOF=DON-NOD+1
DOF=DON-NOD
DOF<=1
DOF=0
open_dock(DOCK_POS)
HANDLE%=scright_h%
SCOF=0
d>
SCOF=0
SCOF=SCON(AFN)-NOSC+1
SCOF=SCON(AFN)-NOSC
SCOF<=1
SCOF=0
open_sc(DOCK_POS)
HANDLE%=scleft_h%
j SCOF=0:
open_sc(DOCK_POS)
BT%
HANDLE%=edit_h%
edit_click
HANDLE%=edsc_h%
ICON%=3
p!
set_sc(AFN,FELD%,$edsci0)
q-
SCON(AFN)<=FELD%
SCON(AFN)=FELD%+1
"Wimp_CreateMenu",,-1
HANDLE%=dock_h%
start(FELD%,
(HANDLE%=down_h%
BT%=4)
(HANDLE%=up_h%
BT%=1)
x+ DOF+=NOD:
DOF+NOD>MAX
DOF=MAX-NOD
open_dock(DOCK_POS)
(HANDLE%=down_h%
BT%=1)
(HANDLE%=up_h%
BT%=4)
DOF-=NOD
DOF<0
DOF=1
DOF=0
open_dock(DOCK_POS)
HANDLE%=defcut_h%
EDFLAG
set_edsc_fields
1
"Wimp_CreateMenu",,edsc_h%,X%-64,Y%+16
#
get_sc(AFN,FELD%)<>""
issue_shortcut(FELD%)
(HANDLE%=scright_h%
BT%=4)
(HANDLE%=scleft_h%
BT%=1)
7 SCOF+=NOSC:
SCOF+NOSC>DSCMAX
SCOF=DSCMAX-NOSC
open_sc(DOCK_POS)
(HANDLE%=scright_h%
BT%=1)
(HANDLE%=scleft_h%
BT%=4)
SCOF-=NOSC
SCOF<0
SCOF=1
SCOF=0
open_sc(DOCK_POS)
HANDLE%=short_h%
ICON%=17
scan_key
ICON%=18
% KN(MENICON%)=0:CT(MENICON%)=0
KFLAG(MENICON%)=
"Wimp_CreateMenu",,-1
BT%=256
single Adjust click
SC=
sc_tick
open_all(DOCK_POS)
set_edsc_fields
$edsci0=
get_sc(AFN,FELD%)
SCKEYC%(AFN,FELD%)<>-1
) $edsci2="("+
SCKEYC%(AFN,FELD%)+")"
$edsci2="(none)"
issue_shortcut(FEN%)
SCKEYC%(AFN,FEN%)<>-1
"Wimp_ProcessKey",SCKEYC%(AFN,FEN%)
get_sc(APP%,NUM%)
SN%,FF%,A$
SN%=NUM%
ANZPS%
FF%=(NUM%
ANZPS%)*SCL%
A$=
SD$(APP%,SN%),FF%,SCL%)
P>0
A$,P-1)
set_sc(APP%,NUM%,A$)
set_sc_o(APP%,NUM%,A$)
open_sc(DOCK_POS)
set_sc_o(APP%,NUM%,A$)
SN%,FF%,B$
SN%=NUM%
ANZPS%
FF%=(NUM%
ANZPS%)*SCL%
(A$)<SCL%
B$=A$+
B$=A$
SD$(APP%,SN%),FF%,SCL%)=B$
edit_click
ICON%
set_edapp(-1):OLH%=-1
close(edit_h%):EDFLAG=
APPNUM>0
( EDAPP+=1:
EDAPP=APPNUM
EDAPP=0
set_edapp(EDAPP)
APPNUM>0
+ EDAPP-=1:
EDAPP=-1
EDAPP=APPNUM-1
set_edapp(EDAPP)
APPNUM>0
EDAPP<APPNUM-1
N=EDAPP
APPNUM-2
, APP$(N)=APP$(N+1):SCON(N)=SCON(N+1)
M=0
SAN%-1
SD$(N,M)=SD$(N+1,M)
M=0
SCON(N)-1
% SCKEYC%(N,M)=SCKEYC%(N+1,M)
EDAPP=APPNUM-2
" APPNUM-=1:
set_edapp(EDAPP)
APPNUM<MAXAPPS
APP$(APPNUM)=$editi9
APP$(APPNUM)<>""
& APPNUM+=1:
set_edapp(APPNUM-1)
erreport("Not more than "+
MAXAPPS+" applications")
scan_key
"Wimp_WhichIcon",short_h%,BUFFER%,&3F0000,&220000
!BUFFER%=-1
ST=0
ST=!BUFFER%
"Wimp_WhichIcon",short_h%,BUFFER%,&3F0000,&230000
!BUFFER%=-1
erreport("You must select a key"):
KE=!BUFFER%
$ CT(MENICON%)=ST:KN(MENICON%)=KE
( KEYC%(MENICON%)=CODES%(KE-4)+&10*ST
KFLAG(MENICON%)=
"Wimp_CreateMenu",,-1
key_pressed
: KEY=BUFFER%!24:HANDLE%=!BUFFER%:ICON%=BUFFER%!4:PRO=
HANDLE%=edsc_h%
ICON%=1
SCKEYC%(AFN,FELD%)=KEY:
2 $edsci2="("+
KEY+")":
redraw_icon(edsc_h%,2)
N=0
DON-1
KFLAG(N)
KEYC%(N)=KEY
PRO=
start(N,
PRO=
"Wimp_ProcessKey",KEY
menu_select
"Wimp_DecodeMenu",,CMENU%,BUFFER%,OPTION%
$OPTION%="Quit"
finish:
$OPTION%="Save all"
save_dock
SV_SUCCESS=
save_defs
$OPTION%,6)="Prefs."
p_sel(
$OPTION%,7))
CMENU%=MENU%
$OPTION%="Delete"
MENICON%<DON
N=MENICON%
DON-1
#L P$(N)=P$(N+1):KFLAG(N)=KFLAG(N+1):CT(N)=CT(N+1):KEYC%(N)=KEYC%(N+1)
KN(N)=KN(N+1)
&- P$(DON)="":DON-=1:
open_dock(DOCK_POS)
$OPTION%="Insert"
DON<MAX
N=DON
MENICON%
+L P$(N+1)=P$(N):KFLAG(N+1)=KFLAG(N):CT(N+1)=CT(N):KEYC%(N+1)=KEYC%(N)
KN(N+1)=KN(N)
DON+=1:P$(MENICON%)=""
open_dock(DOCK_POS)
CMENU%=MENU2%
$OPTION%="Delete"
MENICON%<SCON(AFN)
"Hourglass_On"
7"
N=MENICON%
SCON(AFN)-1
8(
set_sc(AFN,N,
get_sc(AFN,N+1))
9( SCKEYC%(AFN,N)=SCKEYC%(AFN,N+1)
"Hourglass_Off"
<A
set_sc(AFN,SCON(AFN),""):SCON(AFN)-=1:
open_sc(DOCK_POS)
$OPTION%="Insert"
SCON(AFN)<DSCMAX
"Hourglass_On"
B$
N=SCON(AFN)
MENICON%
CH
set_sc(AFN,N+1,
get_sc(AFN,N)):SCKEYC%(AFN,N+1)=SCKEYC%(AFN,N)
"Hourglass_Off"
FF SCON(AFN)+=1:
set_sc(AFN,MENICON%,""):SCKEYC%(AFN,MENICON%)=-1
open_sc(DOCK_POS)
$OPTION%="Edit ..."
set_edapp(0)
M( $editi9="":
redraw_icon(edit_h%,9)
open(edit_h%):EDFLAG=
(BT%
CMENU%=MENU%
"Wimp_CreateMenu",,CMENU%,X%+16,Y%-16
try_close
save_dock
erreport(
SV_SUCCESS=
(DOCKFILE$)
S=0
erreport("Unable to save dock"):
erreport(
try_close:
#S,"V200"
N=0
DON-1
#S,P$(N):
KFLAG(N)+" "+
KN(N)+" "+
CT(N)
erreport(
("SETTYPE "+DOCKFILE$+" TEXT")
SV_SUCCESS=
save_defs
erreport(
p! S=
("<Dock$Dir>.!ShortCuts")
S=0
erreport("Unable to save shortcuts"):
erreport(
try_close:
#S,"V200"
(48+DPOS)+
(48+SCPOS);
(49+SHORTTOP)+
(48-SC)
APPNUM
APPNUM>0
N=0
APPNUM-1
#S,APP$(N)
SCON(N)
SCON(N)>0
M=0
SCON(N)-1
}+
get_sc(N,M):
SCKEYC%(N,M)
erreport(
( *SETTYPE <Dock$Dir>.!ShortCuts Text
set_edapp(N)
N>=APPNUM
N<0
B $editi10="(none)":$defappi0="(no input focus)":AF=
:EDAPP=-1
$editi10=APP$(N):EDAPP=N
AFN=EDAPP:AF=
$editi9=""
! $defappi0=APP$(N)+" (edit)"
open_sc(DOCK_POS)
redraw_icon(defapp_h%,0)
redraw_icon(edit_h%,9)
redraw_icon(edit_h%,10)
p_sel(A$)
A$,5)="Dock."
A$,6)="Left"
DPOS=0
A$,6)="Right"
DPOS=1
d_tick
open_all(DOCK_POS)
A$,10)="ShortCuts."
A$,11)="On "
A$,11)="Off "
sc_tick
open_all(DOCK_POS)
A$,6)="Front."
A$,7)="Never"
SHORTTOP=
) DOCK_POS=-2:
recreate_and_open_all
A$,7,1)="A"
SHORTTOP=
"AppDockSpt_ClearKeyStatus"
st_tick
d_tick
d_untick
DPOS=0
set("Left",DMENU%,0,0)
DPOS=1
set("Righ",DMENU%,0,0)
d_untick
reset("Left",DMENU%,0,0):
reset("Righ",DMENU%,0,0)
sc_tick
sc_untick
set("Off ",SCMENU%,0,0)
set("On ",SCMENU%,0,0)
sc_untick
reset("On ",SCMENU%,0,0)
reset("Off ",SCMENU%,0,0)
st_tick
st_untick
SHORTTOP
set("Neve",STMENU%,0,0)
set("Alt+",STMENU%,0,0)
st_untick
reset("Neve",STMENU%,0,0)
reset("Alt+",STMENU%,0,0)
receive
# REF%=BUFFER%!8:TASK%=BUFFER%!4
BUFFER%!16
finish:
&400C1
readvduinfo
close_all
REOPEN=
:MASK%=0
BUFFER%!20=dock_h%
! F$=
get_string(BUFFER%+44)
"OS_File",17,F$
FELD%=BUFFER%!24
2+DOF
BUFFER%!24<0
FELD%>MAX
TY<>2
TY<>1
TY<>3
$
leaf(P$(FELD%)),1)="!"
7
"Wimp_StartTask","Run "+P$(FELD%)+" "+F$+
"
FELD%>=DON
DON=FELD%+1
) P$(FELD%)=F$:
open_dock(DOCK_POS)
version%>=3
#
FELD%>=DON
DON=FELD%+1
) P$(FELD%)=F$:
open_dock(DOCK_POS)
\
erreport("I cannot accept image files unless RISC OS 3 (or greater) is running !")
&502
help(REF%)
&400C7
EDFLAG
" NM$=
get_string(BUFFER%+28)
test_appname(NM$)
test_appname(AA$)
P=0:FOUND=
P<APPNUM
FOUND
APP$(P)=AA$
FOUND=
P+=1
FOUND
1 AA$+=" *":AF=
:AFN=P:
set_fields:
redraw_sc
clear_sc:AF=
, $defappi0=AA$:
redraw_icon(defapp_h%,0)
clear_sc
N=0
NOSC
$(sct%+16*N)=""
redraw_icon(defcut_h%,N)
redraw_sc
N=0
NOSC
redraw_icon(defcut_h%,N)
redraw_icon(HANDLE%,ICON%)
> !BUFFER%=HANDLE%:BUFFER%!4=ICON%:BUFFER%!8=0:BUFFER%!12=0
"Wimp_SetIconState",,BUFFER%
set_icon_state(HANDLE%,ICON%,P1%,P2%)
B !BUFFER%=HANDLE%:BUFFER%!4=ICON%:BUFFER%!8=P1%:BUFFER%!12=P2%
"Wimp_SetIconState",,BUFFER%
help(REF%)
HANDLE%=BUFFER%!32
T$=""
T$<>""
)E BUFFER%!16=&503:BUFFER%!12=REF%:!BUFFER%=20-4*
(T$)+1)/4)+4
$(BUFFER%+20)=T$+
"Wimp_SendMessage",17,BUFFER%,TASK%
open_all(BF%)
open_sc(BF%)
open_dock(BF%)
close_(HA%)
HA%<>-1
close(HA%)
open_dock(BF%)
X0,X1,Y0,Y1,US%
OSY-=VFAK
DPOS=0
X0=0:X1=92
X0=OSX-96:X1=OSX-4
Y1=OSY
DOF>0
B2 !BUFFER%=up_h%:BUFFER%!4=X0:BUFFER%!8=OSY-92
CK BUFFER%!12=X1:BUFFER%!16=OSY:BUFFER%!20=0:BUFFER%!24=0:BUFFER%!28=BF%
"Wimp_OpenWindow",,BUFFER%
Y1=Y1-96
close_(up_h%)
NOD=(Y1-116)
96-1
J< !BUFFER%=down_h%:BUFFER%!4=X0:BUFFER%!8=Y1-96*(NOD+1)+4
KW BUFFER%!12=X1:BUFFER%!16=Y1-96*(NOD+1)+96:BUFFER%!20=0:BUFFER%!24=0:BUFFER%!28=BF%
"Wimp_OpenWindow",,BUFFER%
Y0=Y1-NOD*96
dock_h%<>-1
!BUFFER%=dock_h%:
"Wimp_DeleteWindow",,BUFFER%
DOF+NOD>MAX
DOF=MAX-NOD
create_dock(BF%)
!BUFFER%=dock_h%
R. BUFFER%!4=X0:BUFFER%!8=Y0+4:BUFFER%!12=X1
S; BUFFER%!16=Y1:BUFFER%!20=0:BUFFER%!24=0:BUFFER%!28=BF%
"Wimp_OpenWindow",,BUFFER%
OSY+=VFAK
open_sc(BF%)
OSY-=VFAK
X0=4
DPOS=0
X0+=96
X1=OSX-4
DPOS=1
X1-=100
US%=0:
SCOF>0
US%=SS%
NOSC=(X1-X0-US%-96)
DPOS=0
DXF%=(X1-X0-US%-96)
SS%+4
DXF%=0
SCOF>0
cC !BUFFER%=scleft_h%:BUFFER%!4=X0+SB%-92+DXF%:BUFFER%!8=OSY-92
d; BUFFER%!12=X0+SB%+DXF%:BUFFER%!16=OSY:BUFFER%!28=BF%
e$
"Wimp_OpenWindow",,BUFFER%
X0+=SS%
close_(scleft_h%)
jE !BUFFER%=scright_h%:BUFFER%!4=X0+NOSC*SS%+DXF%:BUFFER%!8=OSY-92
kB BUFFER%!12=X0+NOSC*SS%+96+DXF%:BUFFER%!16=OSY:BUFFER%!28=BF%
"Wimp_OpenWindow",,BUFFER%
defcut_h%<>-1
!BUFFER%=defcut_h%:
"Wimp_DeleteWindow",,BUFFER%
SCOF+NOSC>MAX
SCOF=MAX-NOSC
create_defcut(BF%)
!BUFFER%=defcut_h%
qF BUFFER%!4=X0+DXF%:BUFFER%!8=OSY-92:BUFFER%!12=X0+NOSC*SS%-4+DXF%
r= BUFFER%!16=OSY:BUFFER%!20=0:BUFFER%!24=0:BUFFER%!28=BF%
"Wimp_OpenWindow",,BUFFER%
redraw_icon(defapp_h%,0)
!BUFFER%=defapp_h%
vB BUFFER%!4=X0+DXF%:BUFFER%!8=OSY-96-42:BUFFER%!12=X0+404+DXF%
w@ BUFFER%!16=OSY-96:BUFFER%!20=0:BUFFER%!24=0:BUFFER%!28=BF%
"Wimp_OpenWindow",,BUFFER%
defcut_h%<>-1
close_(defcut_h%)
close_(scright_h%):
close_(scleft_h%)
close_(defapp_h%)
OSY+=VFAK
readvduinfo
E BUFFER%!0=4:BUFFER%!4=5:BUFFER%!8=3:BUFFER%!12=149:BUFFER%!16=11
- BUFFER%!20=12:BUFFER%!24=6:BUFFER%!28=-1
"OS_ReadVduVariables",BUFFER%,BUFFER%+64
$ HPOT=BUFFER%!64:VPOT=BUFFER%!68
HFAK=1<<HPOT:VFAK=1<<VPOT
( NCOL=BUFFER%!72+1:SCRADR=BUFFER%!76
( HRES=BUFFER%!80+1:VRES=BUFFER%!84+1
* HMAX=HFAK*(HRES-1):VMAX=VFAK*(VRES-1)
LL%=BUFFER%!88
POFF%=LL%/HRES
OSX=HFAK*HRES:OSY=VFAK*VRES
leaf(A$)
B$=""
A$,".")
A=0
B$=A$
B=A
A=
A$,".",B+1)
B$=
A$,B+1)
codes
N=0
CODES%(N)=&181+N
N=9
CODES%(N)=&1CA+N-9
CODES%(12)=&180
acknowledge
!BUFFER%=20:BUFFER%!12=REF%
BUFFER%!16=4
"Wimp_SendMessage",17,BUFFER%
get12(AD%)
A$,N
A$="":N=0
N<12
AD%?N<>0
AD%?N<>13
A$+=
(AD%?N):N+=1
open(HANDLE%)
!BUFFER%=HANDLE%
"Wimp_GetWindowState",,BUFFER%
"Wimp_OpenWindow",,BUFFER%
close(HANDLE%)
!BUFFER%=HANDLE%
"Wimp_CloseWindow",,BUFFER%
close_all
close_(defcut_h%)
close_(dock_h%)
close_(defapp_h%)
close_(scright_h%)
close_(scleft_h%)
close_(up_h%)
close_(down_h%)
clear_all
N=0
B !BUFFER%=short_h%:BUFFER%!4=N:BUFFER%!8=0:BUFFER%!12=(1<<21)
"Wimp_SetIconState",,BUFFER%
GetFileInfo(F$)
erreport(
FILEOK=
F$<>""
"OS_File",5,F$
T%,,laddr%,eaddr%,L%,A%
(F$="")
((T%=1)
(A%
(L%>8)) = 0
ThisFile$="<untitled>"
FileSize$=""
FileType$=""
FileDate$=""
FILEOK=
ThisFile$=F$
FileSize$=
((laddr%>>20)
&FFF)=&FFF
FileType$=""
(laddr%>>8
&FFF)=&0F1
FileType$= "Icon "
(laddr%>>8
&FFF)=&FEC
FileType$= "Template"
(laddr%>>8
&FFF)=&FF9
FileType$= "Sprite "
FileType$=""
FILEOK=
8 FileType$=FileType$+
"00"+
~(laddr%>>8
&FFF),3)
time%=BUFFER%
time%?4=laddr%
time%?3=eaddr%>>24
time%?2=eaddr%>>16
time%?1=eaddr%>>8
time%?0=eaddr%
"OS_ConvertStandardDateAndTime", time%, FileDate$, 28
FileType$="Template"
L%>lbufflen%
FILEOK=
A$="WED"
=FILEOK
get_state(HANDLE%)
!BUFFER%=HANDLE%
"Wimp_GetWindowState",,BUFFER%
coords
coords
: X0=BUFFER%!4:Y0=BUFFER%!8:X1=BUFFER%!12:Y1=BUFFER%!16
2 SCX=BUFFER%!20:SCY=BUFFER%!24:BEH%=BUFFER%!28
get_pointer
"Wimp_GetPointerInfo",,Q%
6 X%=!Q%:Y%=Q%!4:BT%=Q%!8:HANDLE%=Q%!12:ICON%=Q%!16
finish
"Wimp_CloseDown",task_h%,TASK
get_string(AD%)
A$=""
?AD%<>0
?AD%<>13
A$+=
?AD%:AD%+=1
get_line(S)
A$,B
A$="":B=256
B>31
B>31
A$+=
get_num(S)
A$,B
A$="":B=48
((B>=
"9")
A$="-"))
B>31
A$+=
create_defcut(BF%)
#O
created (11:23:59 25-Oct-1992) by WindowEd 1.08
N$,N:N$=
13+" "
P%=WINDOW%:L%=P%+windowlen%
PASS=10
[OPT PASS
.defcutwindow
)AEQUD 0:EQUD 100:EQUD 912:EQUD 816:EQUD 0:EQUD 0:EQUD 25369845
EQUD&80001812+&800*(BF%=-1)
+"EQUD&40002FF+(&FF-11)*(BF%=-1)
EQUD&C0103:EQUD 0
-FEQUD -96:EQUD 4096:EQUD 0:EQUD&19:EQUD&0:EQUD Sprites%:EQUD&200020
.+EQUS "ShortCut"+
13+" ":::EQUD NOSC:]
N=0
NOSC-1
[OPT PASS
s(SS%*N,-92,SS%*N+SB%,0,&2701911B,sct%+16*N,scv%,16)
4 $scv%="Ssbox,sbox_s;L40"+
set_fields
"Wimp_CreateWindow",,WINDOW%
defcut_h%
set_fields
P%=sct%:L%=sct%+sctlen%
N=0
NOSC-1
=& $(sct%+16*N)=
get_sc(AFN,SCOF+N)
N=0
NOSC-1
$(sct%+16*N)=""
create_dock(BF%)
H>
created by WindowEd 1.04
PASS=8
P%=WINDOW%:L%=P%+windowlen%
[OPT PASS
.dockwindow
EQUD 1146
EQUD 4
EQUD 1238
EQUD 980
EQUD 0
EQUD 0
EQUD 1788
T8EQUD %10000000000000000001100000010010+&800*(BF%=-1)
U$EQUD &040002FF+(&FF-11)*(BF%=-1)
EQUD &000C0103
EQUD 0
EQUD -2304
EQUD 92
EQUD 0
[*EQUD %00000000000000000000000000011001
\*EQUD %00000000000000000000000000000000
EQUD Sprites%
EQUD &00000000
EQUS ""+
13+" "
EQUD NOD*2
N=0
NOD-1
DOF+N<DON
SP$=
leaf(P$(DOF+N))
SP$=""
[OPT PASS
EQUD 0
EQUD -92-N*96
EQUD 92
EQUD -N*96
m+ EQUD %00000111000000000000000000000010
EQUS "box"+
13+" "
EQUD 0
EQUD -92-N*96
EQUD 92
EQUD -N*96
SP$,1)="!"
[OPT PASS
v, EQUD %00000111000000001010000100011010
EQUD dockt%+N*24
EQUD 1
EQUD 12
SP$<>""
[OPT PASS
~- EQUD %00000111000000001010000100011011
EQUD dockt%+N*24
EQUD dockt%+N*24+12
EQUD 12
[OPT PASS
- EQUD %00000111000000001010000000011001
EQUS
13+" "
PASS
N=0
NOD-1
SP$=
leaf(P$(DOF+N))
SP$,1)<>"!"
LL=
(SP$)
LL>5
capital(SP$)
2=0
* SP$=
SP$,LL
2)+" "+
SP$,LL
. SP$=
SP$,(LL
2)+1)+" "+
SP$,LL
$ P%=dockt%+N*24:L%=dockt%+dtlen%
[OPT 10
EQUS SP$+
' P%=dockt%+N*24+12:L%=dockt%+dtlen%
[OPT 10
EQUS "Sboxd;L40"+
"Wimp_CreateWindow",,WINDOW%
dock_h%
capital(
(S$)+1
A-=1
B$=
S$,A,1)
A=1
(B$)<97
L1=A-1:
L1<0
L1=0
(S$)-L1
L1<3
L2<3
L1>5
L2>5
S$,L1)+" "+
S$,L2)
downwindow(BF%)
>
created by WindowEd 1.04
PASS=8
P%=WINDOW%:L%=P%+windowlen%
[OPT PASS
.downwindow
EQUD 876
EQUD 740
EQUD 968
EQUD 832
EQUD 0
EQUD 0
EQUD 1844
8EQUD %10001100000000000000100000010010+&800*(BF%=-1)
$EQUD &010002FF+(&FF-11)*(BF%=-1)
EQUD &000C0103
EQUD 0
EQUD -92
EQUD 92
EQUD 0
*EQUD %00000000000000000000000000011001
*EQUD %00000000000000000000000000000000
EQUD Sprites%
EQUD &00000000
EQUS ""+
13+" "
EQUD 1
EQUD 0
EQUD -92
EQUD 92
EQUD 0
*EQUD %11110111000000000011000000011010
EQUS "box_ad"+
13+" "
P%=IDRPTR%:L%=IDT%+idtlen%
[OPT PASS
ALIGN
PASS
IDRPTR%=P%
"Wimp_CreateWindow",,WINDOW%
down_h%
scleftwindow(BF%)
O
created (15:20:39 26-Oct-1992) by WindowEd 1.08
N$:N$=
13+" "
PASS=8
P%=WINDOW%:L%=P%+windowlen%
[OPT PASS
.scleftwindow
CEQUD 876:EQUD 740:EQUD 968:EQUD 832:EQUD 0:EQUD 0:EQUD 25626309
EQUD&80000812+&800*(BF%=-1)
"EQUD&10002FF+(&FF-11)*(BF%=-1)
EQUD&C0103:EQUD 0
DEQUD -92:EQUD 92:EQUD 0:EQUD&19:EQUD&0:EQUD Sprites%:EQUD&200020
&EQUS ""+
13+" ":::EQUD 1
t(0,-92,92,0,&F700301A):EQUS "box_al"+
13+" "
P%=IDRPTR%:L%=IDT%+idtlen%
[OPT PASS
ALIGN
PASS
IDRPTR%=P%
"Wimp_CreateWindow",,WINDOW%
scleft_h%
defappwindow(BF%)
O
created (15:57:22 26-Oct-1992) by WindowEd 1.08
N$:N$=
13+" "
PASS=8
P%=WINDOW%:L%=P%+windowlen%
[OPT PASS
.defappwindow
CEQUD 136:EQUD 824:EQUD 540:EQUD 866:EQUD 0:EQUD 0:EQUD 25447029
EQUD&80000812+&800*(BF%=-1)
"EQUD&10002FF+(&FF-11)*(BF%=-1)
EQUD&C0103:EQUD 0
EEQUD -42:EQUD 404:EQUD 0:EQUD&19:EQUD&0:EQUD Sprites%:EQUD&200020
&EQUS "<untitled>"+
13+" ":::EQUD 1
s(0,-42,404,0,&2700013B,defappi0,defappv0,30)
P%=IDRPTR%:L%=IDT%+idtlen%
[OPT PASS
PASS
IDRPTR%=P%
"Wimp_CreateWindow",,WINDOW%
defapp_h%
edscwindow
O
created (18:22:08 30-Oct-1992) by WindowEd 1.08
N$:N$=
13+" "
PASS=8
P%=WINDOW%:L%=P%+windowlen%
[OPT PASS
.edscwindow
CEQUD 366:EQUD 400:EQUD 790:EQUD 610:EQUD 0:EQUD 0:EQUD 25348437
0EQUD&A4000012:EQUD&1000207:EQUD&C0103:EQUD 0
GEQUD -500:EQUD 600:EQUD 0:EQUD&119:EQUD&0:EQUD Sprites%:EQUD&200020
(EQUD edsctb:EQUD -1:EQUD 40:::EQUD 6
s(146,-62,400,-16,&700F13D,edsci0,-1,16)
s(244,-122,282,-76,&700F13D,edsci1,edscv1,1)
s(296,-122,400,-76,&27000139,edsci2,-1,8)
t(318,-192,400,-144,&C701903D):EQUS "OK"+
13+" "
s(20,-62,142,-16,&7000111,edsci4,-1,13)
s(22,-122,238,-76,&7000111,edsci5,-1,14)
P%=IDRPTR%:L%=IDT%+idtlen%
[OPT PASS
.edsctb
EQUS "Edit shortcut"+
]:P%+=29:[OPT PASS
#&.edsci0 EQUS "1234567 1234567"+
$0.edsci1 EQUS ""+
13:.edscv1 EQUS "A~;KN"+
%/.edsci2 EQUS "(1234)"+
13:]:P%+=1:[OPT PASS
&0.edsci4 EQUS "Action:"+
13:]:P%+=5:[OPT PASS
'$.edsci5 EQUS "Key shortcut:"+
( ALIGN
PASS
IDRPTR%=P%
"Wimp_CreateWindow",,WINDOW%
edsc_h%
editwindow
1O
created (22:58:53 01-Mai-1993) by WindowEd 1.08
N$:N$=
13+" "
PASS=8
P%=WINDOW%:L%=P%+windowlen%
[OPT PASS
.editwindow
7=EQUD 352:EQUD 242:EQUD 992:EQUD 550:EQUD 0:EQUD 0:EQUD -1
80EQUD&85030012:EQUD&1000207:EQUD&C0103:EQUD 0
9GEQUD -308:EQUD 640:EQUD 0:EQUD&119:EQUD&0:EQUD Sprites%:EQUD&200020
:)EQUD edittb:EQUD -1:EQUD 15:::EQUD 13
t(-800,-190,-632,-14,&27000019):EQUS N$ :
dead
t(-800,-266,-632,-204,&27000019):EQUS N$ :
dead
t(-800,-342,-632,-278,&37000019):EQUS N$ :
dead
s(468,-292,620,-240,&1701313D,editi3,editv3,6)
s(588,-56,620,-24,&C700211B,editi4,editv4,1)
s(556,-56,588,-24,&C700211B,editi4,editv5,1)
s(212,-132,376,-80,&1701313D,editi6,editv3,7)
t(508,-178,620,-130,&7800001):EQUS "<Deleted>"+
13+" "
s(522,-212,620,-160,&1701313D,editi8,editv3,4)
s(276,-212,514,-160,&700F13D,editi9,-1,40)
s(212,-68,548,-16,&1700013D,editi10,editv10,40)
s(12,-212,268,-160,&7000311,editi11,-1,17)
s(12,-68,204,-16,&7000311,editi12,-1,13)
P%=IDRPTR%:L%=IDT%+idtlen%
[OPT PASS
.edittb
EQUS "Edit shortcuts"+
.editi3 EQUS "Close"+
.editv3 EQUS "R5,3"+
.editi4 EQUB 13
P!.editv4 EQUS "R5;Sup,pup"+
Q%.editv5 EQUS "R5;Sdown,pdown"+
.editi6 EQUS "Delete"+
.editi8 EQUS "Add"+
T*.editi9 EQUS ""+
13:]:P%+=39:[OPT PASS
U+.editi10 EQUS ""+
13:]:P%+=39:[OPT PASS
.editv10 EQUS "R2"+
W'.editi11 EQUS "New application"+
X#.editi12 EQUS "Application"+
Y ALIGN
PASS
IDRPTR%=P%
"Wimp_CreateWindow",,WINDOW%
edit_h%
scrightwindow(BF%)
cO
created (15:20:44 26-Oct-1992) by WindowEd 1.08
N$:N$=
13+" "
PASS=8
P%=WINDOW%:L%=P%+windowlen%
[OPT PASS
.scrightwindow
iCEQUD 858:EQUD 608:EQUD 950:EQUD 700:EQUD 0:EQUD 0:EQUD 25619189
EQUD&80000812+&800*(BF%=-1)
k"EQUD&10002FF+(&FF-11)*(BF%=-1)
EQUD&C0103:EQUD 0
mDEQUD -92:EQUD 92:EQUD 0:EQUD&19:EQUD&0:EQUD Sprites%:EQUD&200020
n&EQUS ""+
13+" ":::EQUD 1
t(0,-92,92,0,&F700301A):EQUS "box_ar"+
13+" "
P%=IDRPTR%:L%=IDT%+idtlen%
[OPT PASS
s ALIGN
PASS
IDRPTR%=P%
"Wimp_CreateWindow",,WINDOW%
scright_h%
upwindow(BF%)
|>
created by WindowEd 1.04
PASS=8
P%=WINDOW%:L%=P%+windowlen%
[OPT PASS
.upwindow
EQUD 858
EQUD 608
EQUD 950
EQUD 700
EQUD 0
EQUD 0
EQUD 1840
8EQUD %10000000000000000000100000010010+&800*(BF%=-1)
$EQUD &010002FF+(&FF-11)*(BF%=-1)
EQUD &000C0103
EQUD 0
EQUD -92
EQUD 92
EQUD 0
*EQUD %00000000000000000000000000011001
*EQUD %00000000000000000000000000000000
EQUD Sprites%
EQUD &00000000
EQUS ""+
13+" "
EQUD 1
EQUD 0
EQUD -92
EQUD 92
EQUD 0
*EQUD %11110111000000000011000000011010
EQUS "box_au"+
13+" "
P%=IDRPTR%:L%=IDT%+idtlen%
[OPT PASS
ALIGN
PASS
IDRPTR%=P%
"Wimp_CreateWindow",,WINDOW%
up_h%
shortwindow
O
created (15:14:58 28-Sep-1996) by WindowEd 1.08
N$:N$=
13+" "
PASS=8
P%=WINDOW%:L%=P%+windowlen%
[OPT PASS
.shortwindow
EEQUD 1212:EQUD 464:EQUD 1708:EQUD 800:EQUD 0:EQUD 0:EQUD 37133065
0EQUD&84370012:EQUD&1000207:EQUD&C0103:EQUD 0
GEQUD -336:EQUD 496:EQUD 0:EQUD&119:EQUD&0:EQUD Sprites%:EQUD&200020
*EQUD shorttb:EQUD -1:EQUD 24:::EQUD 19
s(12,-208,152,-160,&17025113,shorti0,shortv0,6)
s(160,-208,310,-160,&17025113,shorti1,shortv1,7)
s(336,-208,484,-160,&17025113,shorti2,shortv2,6)
s(12,-264,232,-216,&17025113,shorti3,shortv3,12)
s(12,-76,76,-12,&1703511B,shorti4,shortv4,3)
s(80,-76,144,-12,&1703511B,shorti5,shortv5,3)
s(148,-76,212,-12,&1703511B,shorti6,shortv6,3)
s(216,-76,280,-12,&1703511B,shorti7,shortv7,3)
s(284,-76,348,-12,&1703511B,shorti8,shortv8,3)
s(352,-76,416,-12,&1703511B,shorti9,shortv9,3)
s(420,-76,484,-12,&1703511B,shorti10,shortv10,3)
s(12,-144,76,-80,&1703511B,shorti11,shortv11,3)
s(80,-144,144,-80,&1703511B,shorti12,shortv12,3)
s(148,-144,212,-80,&1703511B,shorti13,shortv13,4)
s(216,-144,280,-80,&1703511B,shorti14,shortv14,4)
s(284,-144,348,-80,&1703511B,shorti15,shortv15,4)
s(352,-144,484,-80,&1703511B,shorti16,shortv16,6)
s(364,-324,484,-256,&1701313D,shorti17,shortv17,3)
s(248,-316,352,-264,&1701313D,shorti18,shortv18,4)
P%=IDRPTR%:L%=IDT%+idtlen%
[OPT PASS
.shorttb
EQUS "Shortcut: !Edit"+
]:P%+=8:[OPT PASS
C.shorti0 EQUS "Alone"+
13:.shortv0 EQUS "Sradiooff,radioon"+
D.shorti1 EQUS "+Shift"+
13:.shortv1 EQUS "Sradiooff,radioon"+
C.shorti2 EQUS "+Ctrl"+
13:.shortv2 EQUS "Sradiooff,radioon"+
I.shorti3 EQUS "+Ctrl-Shift"+
13:.shortv3 EQUS "Sradiooff,radioon"+
8.shorti4 EQUS "F1"+
13:.shortv4 EQUS "Skey,keys"+
8.shorti5 EQUS "F2"+
13:.shortv5 EQUS "Skey,keys"+
8.shorti6 EQUS "F3"+
13:.shortv6 EQUS "Skey,keys"+
8.shorti7 EQUS "F4"+
13:.shortv7 EQUS "Skey,keys"+
8.shorti8 EQUS "F5"+
13:.shortv8 EQUS "Skey,keys"+
8.shorti9 EQUS "F6"+
13:.shortv9 EQUS "Skey,keys"+
:.shorti10 EQUS "F7"+
13:.shortv10 EQUS "Skey,keys"+
:.shorti11 EQUS "F8"+
13:.shortv11 EQUS "Skey,keys"+
:.shorti12 EQUS "F9"+
13:.shortv12 EQUS "Skey,keys"+
;.shorti13 EQUS "F10"+
13:.shortv13 EQUS "Skey,keys"+
;.shorti14 EQUS "F11"+
13:.shortv14 EQUS "Skey,keys"+
;.shorti15 EQUS "F12"+
13:.shortv15 EQUS "Skey,keys"+
?.shorti16 EQUS "Print"+
13:.shortv16 EQUS "Skeyp,keyps"+
5.shorti17 EQUS "OK"+
13:.shortv17 EQUS "R6,3"+
6.shorti18 EQUS "Off"+
13:.shortv18 EQUS "R5,3"+
ALIGN
PASS
IDRPTR%=P%
"Wimp_CreateWindow",,WINDOW%
short_h%
infowindow
O
created (15:35:32 28-Sep-1996) by WindowEd 1.08
N$:N$=
13+" "
PASS=8
P%=WINDOW%:L%=P%+windowlen%
[OPT PASS
.infowindow
DEQUD 658:EQUD 550:EQUD 1222:EQUD 858:EQUD 0:EQUD 0:EQUD 36955673
0EQUD&84270012:EQUD&1070207:EQUD&C0E0C:EQUD 0
JEQUD -308:EQUD 564:EQUD 0:EQUD&13D:EQUD&3000:EQUD Sprites%:EQUD&200020
)EQUD infotb:EQUD -1:EQUD 19:::EQUD 11
t(676,-204,852,-156,&B700303D):EQUS N$
s(156,-60,556,-8,&1700013D,infoi1,infov1,17)
s(156,-120,556,-68,&1700013D,infoi2,infov2,20)
s(156,-180,556,-128,&1700013D,infoi3,infov3,16)
s(156,-240,556,-188,&1700013D,infoi4,infov4,31)
t(12,-56,156,-16,&17000211):EQUS "Name"+
13+" "
t(12,-116,156,-76,&17000211):EQUS "Purpose"+
13+" "
t(12,-176,156,-136,&17000211):EQUS "Author"+
13+" "
t(12,-236,156,-196,&17000211):EQUS "Status"+
13+" "
s(156,-300,556,-248,&1700013D,infoi9,infov9,31)
t(12,-296,156,-256,&17000211):EQUS "Version"+
13+" "
P%=IDRPTR%:L%=IDT%+idtlen%
[OPT PASS
.infotb
!EQUS "About this program"+
=.infoi1 EQUS "Application dock"+
13:.infov1 EQUS "R2"+
@.infoi2 EQUS "NeXT style backdrop"+
13:.infov2 EQUS "R2"+
<.infoi3 EQUS "Martin W
rthner"+
13:.infov3 EQUS "R2"+
H.infoi4 EQUS "FREEWARE"+
13:]:P%+=22:[OPT PASS:.infov4 EQUS "R2"+
R.infoi9 EQUS "2.43 (28-Sep-1996)"+
13:]:P%+=12:[OPT PASS:.infov9 EQUS "R2"+
ALIGN
PASS
IDRPTR%=P%
"Wimp_CreateWindow",,WINDOW%
info_h%
s(S1%,S2%,S3%,S4%,S5%,S6%,S7%,S8%)
[OPT PASS
( EQUD S1%:EQUD S2%:EQUD S3%:EQUD S4%
* EQUD S5%:EQUD S6%:EQUD S7%:EQUD S8%:]
t(S1%,S2%,S3%,S4%,S5%)
[OPT PASS
1 EQUD S1%:EQUD S2%:EQUD S3%:EQUD S4%:EQUD S5%
buffers
OPTION%=IDB%
OPTION%+200>IDB%+idblen%
1,"Not enough buffer space"
indirected_text
P%=IDT%:L%=IDT%+idtlen%
[OPT 10
ALIGN
) .appname EQUS
13+" "
, .top_shortcut EQUS "Alt+Ctrl+Shift"+
!; .defappi0 EQUS "(no input focus)"+
13:]:P%+=13:[OPT 10
"* .defappv0 EQUS "Sapptit,apptit_s"+
ALIGN
IDRPTR%=P%
toggle(ITEM$,M%,NUM,BIT)
DA%=
finditem(ITEM$,M%)
DA%!NUM=DA%!NUM
(2^BIT)
set(ITEM$,M%,NUM,BIT)
DA%=
finditem(ITEM$,M%)
DA%!NUM=DA%!NUM
(2^BIT)
reset(ITEM$,M%,NUM,BIT)
DA%=
finditem(ITEM$,M%)
4( DA%!NUM=DA%!NUM
(2^BIT)
(2^BIT)
bit(ITEM$,M%,NUM,BIT,FLAG)
FLAG=(FLAG<>0)
DA%=
finditem(ITEM$,M%)
:< DA%!NUM=(DA%!NUM
(-1
(1<<BIT)))
(FLAG
(1<<BIT))
finditem(ITEM$,M%)
FOUND,SUBN,N,S$
FOUND=0:SUBN=0
S$=""
M%+=28
(M%!8
1<<8)
II$=$(M%!12)
II$=$(M%+12)
II$,4)=ITEM$
FOUND=M%
GA
M%!4<>-1
M%!4-M%<4000
M%!4>M%
SUBN+=1:
store(M%!4)
M%+=24
FOUND<>0
(M%!-24
&80)
FOUND=0
SUBN>0
L N=1
N% FOUND=
finditem(ITEM$,
recall)
N=N+1
N>SUBN
FOUND<>0
=FOUND
initialise_menu_tree
UB TitelColour=7:TitelBackground=2:MenuColour=7:MenuBackground=0
V MenuWidth=192:ItemHeight=40
W2 D2%=MenuColour<<24
MenuBackground<<28
X; D2IND%=D2%
&100:
Default flags for indirected item
Y0 D2S%=D2%
1<<22 :
Default for shaded item
P%=MENU%
MAINPOINTER%(10):MAIN=0
S$=""
initialise_menu
MEN$="MENU END"
initialise_menu
SUBN,N
MEN$
MEN$<>"MENU END"
MEN$="Dock"
DMENU%=P%
MEN$="ShortCuts"
SCMENU%=P%
MEN$="Front"
STMENU%=P%
MEN$="Prefs"
PRMENU%=P%
MENWIDTH%
S$=""
MAIN+=1:MAINPOINTER%(MAIN)=P%
S$<>""
recall)=P%
P%>MENU%+menulen%-100
1,"Not enough space for menu-tree"
$P%=MEN$
p- P%?12=TitelColour:P%?13=TitelBackground
q+ P%?14=MenuColour:P%?15=MenuBackground
r& P%!16=MENWIDTH%:P%!20=ItemHeight
P%!24=0:P%+=28
SUBN=0
ITEM$
FLAGS1%,FLAGS2%
!P%=FLAGS1%:P%!8=FLAGS2%
z;
SUB<>-1
SUB<>1
SUB<>2
1,"Sub number error"
SUB=2
|;
SUBW_HANDLE%:SUB=SUBW_HANDLE%:
Window as submenu
SUB=-2
SUB=PRMENU%
SUB=1
SUBN+=1:
store(P%+4)
P%!4=SUB
FLAGS2%
&100
:
BUFFER_POINTER%,V_STRING_POINTER%,BUFFER_LENGTH%
5 P%!12=BUFFER_POINTER%:P%!16=V_STRING_POINTER%
P%!20=BUFFER_LENGTH%
$(P%+12)=ITEM$+
P%+=24
P%>MENU%+menulen%-100
1,"Not enough space for menu-tree"
ITEM$
ITEM$="ITEM END"
!(P%-24)=!(P%-24)
SUBN>0
N=1
SUBN
initialise_menu
store(ADR%)
S$=S$+
"0000000"+
~ADR%,8)
recall
S$=""
1,"Submenu pointer stack empty"
! ADR%=
("&"+
S$,8)):S$=
S$,9)
=ADR%
Menu Data:
[Menu Title,width
[Item$, flags1, flags2, sub (-1=no submenu, 1=submenu, 2=subwindow)
{if sub=2: ,handle of subwindow} {if indirect flag (i.e. bit 8) is
set in flags2: ,buffer_pointer, validation_string_pointer,
buffer_length}]^
"ITEM END"
[Submenu Data]^
"MENU END"]^
"AppDock",200
"Info",0,D2%,2,info_h%
"",0,D2IND%,2,short_h%,appname,-1,11
"Delete",0,D2%,-1
"Insert",0,D2%,-1
"Save all",0,D2%,-1
"Prefs",0,D2%,1
"Quit",0,D2%,-1
"ITEM END"
"Prefs",160
"Dock",0,D2%,1
"ShortCuts",0,D2%,1
"Front",0,D2%,1
"ITEM END"
"Dock",100
"Left",0,D2%,-1
"Right",0,D2%,-1
"ITEM END"
"ShortCuts",130
"On ",0,D2%,-1
"Off ",0,D2%,-1
"ITEM END"
"Front",256
"Never",0,D2%,-1
"Alt+Ctrl+Shift",0,D2IND%,-1,top_shortcut,-1,16
"ITEM END"
"AppDock",160
"Info",0,D2%,2,info_h%
"ShortCut",0,D2%,2,edsc_h%
"Delete",0,D2%,-1
"Insert",0,D2%,-1
"Save all",0,D2%,-1
"Edit ...",0,D2%,-1
"ITEM END"
"MENU END"
errorbox
"Wimp_ReportError",
$+" (internal error code "+
+")",1,"AppDock2"
erreport(E$)
"Wimp_ReportError",
0)+E$,1,"AppDock2"
CheckOK(R$)
0)+R$
"Wimp_ReportError",R$,3,"AppDock2"
=E%=1
confirm
CheckOK("Are you sure ? Current data is unsaved")
errc(E$)
"Wimp_ReportError",
0)+E$,3,"AppDock2"